How to test a ligo script with custom Tezos
Prerequisite
Purpose
Test custom opcode which is generated from custom ligo compiler
Procedure
In the tezos docker container
export CONTRACT=cat main.tz && export STORAGE=cat storage.tz && export PARAM=cat parameter.tz && tezos-client run script "$CONTRACT" on storage "$STORAGE" and input "$PARAM"
main.tz: ligo compile-contract src/test/contracts/level_lock.ligo main > ./main.tz
storage.tz: ligo compile-storage src/test/contracts/level_lock.ligo main "echo $(cat initial_storage)" > storage.tz
parameter.tz: ligo compile-parameter src/test/contracts/level_lock.ligo main "Deposit(record unlock_level = 1 end)" > parameter.tz